﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:XAudio2Controls">

    <!-- Region: SpectrumAnalyzer -->
    <LinearGradientBrush x:Key="SpectrumBarBrush"
                         EndPoint="0.5,0"
                         StartPoint="0.5,1">
        <GradientStop Color="#FF192F93"
                      Offset="0" />
        <GradientStop Color="#FF506FB0" Offset=".1"/>
        
        <GradientStop Color="#FF64F7F7"
                      Offset=".9" />
        <GradientStop Color="#FF88F7F7"
                      Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="SpectrumPeakBrush"
                     Color="#FF1022D1" />
    <Style TargetType="{x:Type local:SpectrumAnalyzer}">
        <Setter Property="BarStyle">
            <Setter.Value>
                <Style TargetType="{x:Type Rectangle}">
                    <Setter Property="Fill"
                            Value="{StaticResource SpectrumBarBrush}" />
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="PeakStyle">
            <Setter.Value>
                <Style TargetType="{x:Type Rectangle}">
                    <Setter Property="Fill"
                            Value="{StaticResource SpectrumPeakBrush}" />
                    <Setter Property="Stroke"
                            Value="{StaticResource SpectrumBarBrush}"/>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:SpectrumAnalyzer}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Canvas Name="PART_SpectrumCanvas"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                ClipToBounds="True" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!-- EndRegion: SpectrumAnalyzer -->

</ResourceDictionary>